package com.tiancikeji.zaoke.app.constants;

import java.util.HashMap;
import java.util.Map;

public class ErrorCodeConstants {

	public static final int STATUS_OK = 0;
	public static final int STATUS_PARAM_ERROR = 300;
	public static final int STATUS_ERROR = 400;
	
	public static final int STATUS_FOOD_NOT_EXISTS = 10120;
	
	public static final int STATUS_FOOD_WRONG_PAIR = 10131;
	public static final int STATUS_FOOD_NO_FOOD = 10132;
	public static final int STATUS_FOOD_SALE_OUT = 10133;
	
	public static final int STATUS_USER_NO_NAME = 10140;
	public static final int STATUS_USER_VALIDATE_FAILURE = 10141;
	public static final int STATUS_USER_NO_LOGIN = 10172;
	
	public static final int STATUS_CARD_MISMATCH = 10170;
	public static final int STATUS_CARD_BLANK = 10171;

	public static final int STATUS_PHONE_BLANK = 10510;
	public static final int STATUS_PHONE_INVALID = 10511;
	public static final int STATUS_USER_LOCKED = 10512;
	public static final int STATUS_USER_ALREADY_REGISTER = 10513;
	public static final int STATUS_PHONE_ALREADY_REGISTER = 10514;
	
	public static final int STATUS_VERIFY_CODE_BLANK = 10520;
	public static final int STATUS_VERIFY_CODE_INVALID = 10521;

	public static final int STATUS_PASSWORD_BLANK = 10530;
	public static final int STATUS_PASSWORD_INVALID = 10531;
	public static final int STATUS_LOGIN_FAILURE = 10532;
	public static final int STATUS_LOGIN_FAILURE_PASSWD = 10533;
	public static final int STATUS_PASSWD_FAILURE = 10533;

	public static final int STATUS_PASSWORD_NOTEQUAL = 10240;

	public static final int STATUS_ORDER_NOT_EXISTS = 10230;

	public static final int STATUS_PAYMODE_NOT_EXISTS = 10151;
	public static final int STATUS_ZONE_NOT_EXISTS = 10152;
	public static final int STATUS_PAY_ALI_ERROR = 10153;
	public static final int STATUS_PAY_BALANCE_ERROR = 10154;

	public static final int STATUS_MONEY_ZERO = 10142;
	
	public static Map<Integer, String> ERROR_MSG_MAP = new HashMap<Integer, String>();
	
	static{
		ERROR_MSG_MAP.put(STATUS_FOOD_NOT_EXISTS, "食品不存在");

		ERROR_MSG_MAP.put(STATUS_PARAM_ERROR, "参数错误");
		
		ERROR_MSG_MAP.put(STATUS_FOOD_WRONG_PAIR, "不能够搭配");
		ERROR_MSG_MAP.put(STATUS_FOOD_NO_FOOD, "至少选择一种食品");
		ERROR_MSG_MAP.put(STATUS_FOOD_SALE_OUT, "已经卖光");

		ERROR_MSG_MAP.put(STATUS_USER_NO_NAME, "未设置昵称");
		ERROR_MSG_MAP.put(STATUS_USER_VALIDATE_FAILURE, "用户登录过期");
		ERROR_MSG_MAP.put(STATUS_USER_NO_LOGIN, "用户未登录");

		ERROR_MSG_MAP.put(STATUS_CARD_MISMATCH, "卡号和识别码不匹配，请核对会员卡号和识别码");
		ERROR_MSG_MAP.put(STATUS_CARD_BLANK, "卡号或识别码为空");

		ERROR_MSG_MAP.put(STATUS_PHONE_BLANK, "手机号为空");
		ERROR_MSG_MAP.put(STATUS_PHONE_INVALID, "手机号格式不正确");
		ERROR_MSG_MAP.put(STATUS_USER_LOCKED, "用户被锁定");
		ERROR_MSG_MAP.put(STATUS_USER_ALREADY_REGISTER, "用户已经注册");
		ERROR_MSG_MAP.put(STATUS_PHONE_ALREADY_REGISTER, "手机已经注册");

		ERROR_MSG_MAP.put(STATUS_VERIFY_CODE_BLANK, "验证码为空");
		ERROR_MSG_MAP.put(STATUS_VERIFY_CODE_INVALID, "验证码不正确");

		ERROR_MSG_MAP.put(STATUS_PASSWORD_BLANK, "密码为空");
		ERROR_MSG_MAP.put(STATUS_PASSWORD_INVALID, "密码格式不正确");
		ERROR_MSG_MAP.put(STATUS_LOGIN_FAILURE, "手机号或密码错误");
		ERROR_MSG_MAP.put(STATUS_LOGIN_FAILURE_PASSWD, "密码错误");
		ERROR_MSG_MAP.put(STATUS_PASSWD_FAILURE, "修改密码失败，请重试");

		ERROR_MSG_MAP.put(STATUS_PASSWORD_NOTEQUAL, "两次密码输入不一样");

		ERROR_MSG_MAP.put(STATUS_ORDER_NOT_EXISTS, "订单不存在");

		ERROR_MSG_MAP.put(STATUS_PAYMODE_NOT_EXISTS, "不支持此种支付方式");
		ERROR_MSG_MAP.put(STATUS_ZONE_NOT_EXISTS, "不支持此取餐地点");

		ERROR_MSG_MAP.put(STATUS_PAY_ALI_ERROR, "支付宝支付出现问题，请选择其他支付方式");
		ERROR_MSG_MAP.put(STATUS_PAY_BALANCE_ERROR, "余额不足，请选择其他支付方式");

		ERROR_MSG_MAP.put(STATUS_MONEY_ZERO, "充值金额为0，请选择其他金额");
	}
}
